package com.cn.algorithm02.class17;

import lombok.Data;

import java.util.ArrayList;

/***
 * @author: hels
 * @description: 点结构描述
 * 当前值 入度 出度 下一步点  边
 **/
public class Node {
    public int value;
    public int in;
    public int out;

    public ArrayList<Node> nexts;
    public ArrayList<Edge> edges;

    public Node(int value) {
        this.value = value;
        in = 0;
        out = 0;
        nexts = new ArrayList<>();
        edges = new ArrayList<>();
    }


    public ArrayList<Node> getNexts() {
        return nexts;
    }

    public void setNexts(ArrayList<Node> nexts) {
        this.nexts = nexts;
    }

    public ArrayList<Edge> getEdges() {
        return edges;
    }

    public void setEdges(ArrayList<Edge> edges) {
        this.edges = edges;
    }

    @Override
    public String toString() {
        return "Node{" +
                "value=" + value +
                ", in=" + in +
                ", out=" + out +
                ", nexts=" + nexts +
                ", edges=" + edges +
                '}';
    }
}
